package model

type InvoiceReq struct {
	ImgUrl   string `json:"imgUrl"`
	Username string `json:"username"`
}

type InvoiceInfo struct {
	InvoiceCode string `json:"发票号码"`
	InvoiceDate string `json:"开票日期"`
	BuyerName   string `json:"购买方姓名"`
	BuyerCode   string `json:"购方纳税人识别号"`
	BuyMoney    string `json:"发票金额"`
	TotalToken  int    `json:"totalToken"` // 总数量
	IsChecked   int    `json:"isChecked"`  // 已经核验过
	CheckTime   string    `json:"checkTime"`  // 核验时间
}

type InvoiceCheckInfo struct {
	Id          int    `json:"id" gorm:"primary_key;autoIncrement:true"`
	InvoiceCode string `json:"invoiceCode" gorm:"column:invoice_code;comment:发票号码;type:varchar(128);size:128;"`
	InvoiceDate string `json:"invoiceDate" gorm:"column:invoice_date;comment:发票时间;type:varchar(128);size:128;"`
	BuyerName   string `json:"buyerName" gorm:"column:buyer_name;comment:购方;type:varchar(128);size:128;"`
	BuyerCode   string `json:"buyerCode" gorm:"column:buyer_code;comment:购方;type:varchar(128);size:128;"`
	BuyMoney    string `json:"buyMoney" gorm:"column:buy_money;comment:金额;type:varchar(128);size:128;"`
	TotalToken  int    `json:"totalToken" gorm:"column:total_token;comment:total_token;type:int(11);size:11;"`
	CheckTime   string    `json:"checkTime" gorm:"column:check_time;comment:total_token;type:varchar(128);size:128;"`
	CheckUser   string `json:"checkUser" gorm:"column:check_user;comment:total_user;type:varchar(128);size:128;"`
    IsChecked int `json:"isChecked" gorm:"-"`
}

func (InvoiceCheckInfo) TableName() string {
    return "invoice_check_info"
}
